{"version":3,"file":"jspdf.min.js","sources":["jspdf.js"],"names":["jsPDF","btoa","window","data","b64","b64a","split","o1","o2","o3","h1","h2","h3","h4","bits","i","ac","enc","tmp_arr","r","charCodeAt","length","join","slice","atob","dec","indexOf","charAt","String","fromCharCode","getObjectLength","Object","keys","object","e","hasOwnProperty","PubSub","context","this","topics","publish","topic","args","currentTopic","toremove","fn","l","pair","emptyFunc","Array","prototype","call","arguments","push","apply","splice","subscribe","callback","once","unsubscribe","token","orientation","unit","format","compressPdf","toString","toLowerCase","zpipe","format_as_string","version","content","content_length","compress","pdfVersion","pageFormats","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","letter","government-letter","legal","junior-legal","ledger","tabloid","textColor","drawColor","page","pages","objectNumber","outToPages","offsets","fonts","fontmap","activeFontSize","activeFontKey","lineWidth","lineHeightProportion","pageHeight","pageWidth","k","documentProperties","title","subject","author","keywords","creator","lineCapID","lineJoinID","API","events","tmp","plugin","f2","number","toFixed","f3","padd2","n","padd10","out","string","newObject","putStream","str","wPt","hPt","kids","putPages","p","arr","uint","deflater","adler32","adler32cs","from","Deflater","append","Uint8Array","flush","putFont","font","PostScriptName","encoding","putFonts","fontKey","putXobjectDict","putResourceDictionary","putResources","addToFontDictionary","fontName","fontStyle","undef","FontObject","addFont","id","metadata","addFonts","HELVETICA","TIMES","COURIER","NORMAL","BOLD","ITALIC","BOLD_ITALIC","standardFonts","parts","dictionary","to8bitStream","text","flags","sourceEncoding","encodingBlock","outputEncoding","newtext","isUnicode","ch","bch","autoencode","codePages","noBOM","Error","pdfEscape","replace","putInfo","created","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","putCatalog","putTrailer","beginPage","_addPage","pageNumber","getFont","key","buildDocument","o","getStyle","style","op","output","type","options","array","blob","navigator","getUserMedia","URL","undefined","createObjectURL","ArrayBuffer","Blob","saveAs","document","location","href","open","err","internal","getFontSize","getLineHeight","write","string1","string2","string3","etc","getCoordinateString","value","getVerticalCoordinateString","collections","scaleFactor","pageSize","width","height","getNumberOfPages","addPage","x","y","_first","_second","_third","match","concat","line","x1","y1","x2","y2","lines","scale","closed","scalex","scaley","leg","x3","y3","x4","y4","rect","w","h","triangle","roundedRect","rx","ry","MyArc","Math","SQRT2","ellipse","lx","ly","circle","setProperties","properties","property","setFontSize","size","setFont","setFontStyle","setFontType","getFontList","list","setLineWidth","setDrawColor","ch1","ch2","ch3","ch4","color","setFillColor","setTextColor","g","b","patt","test","hex","bigint","parseInt","CapJoinStyles","butt","but","miter",1,"round","rounded",2,"projecting","project","square","bevel","setLineCap","setLineJoin","save","filename","newEvents","eventname","handler_and_args"],"mappings":"AAsCA,GAAIA,OAAS,WACT,YAMA,UAAWC,QAAS,YAAa,CAC7BC,OAAOD,KAAO,SAAUE,GAsDpB,GAAIC,GAAM,oEACNC,EAAOD,EAAIE,MAAM,IACjBC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAI,EACJC,EAAK,EACLC,EAAM,GACNC,KACAC,CAEJ,GAAG,CACCZ,EAAKJ,EAAKiB,WAAWL,IACrBP,GAAKL,EAAKiB,WAAWL,IACrBN,GAAKN,EAAKiB,WAAWL,IAErBD,GAAOP,GAAM,GAAKC,GAAM,EAAIC,CAE5BC,GAAKI,GAAQ,GAAK,EAClBH,GAAKG,GAAQ,GAAK,EAClBF,GAAKE,GAAQ,EAAI,EACjBD,GAAKC,EAAO,EAGZI,GAAQF,KAAQX,EAAKK,GAAML,EAAKM,GAAMN,EAAKO,GAAMP,EAAKQ,SACjDE,EAAIZ,EAAKkB,OAElBJ,GAAMC,EAAQI,KAAK,GACnBH,GAAIhB,EAAKkB,OAAS,CAClB,QAAQF,EAAIF,EAAIM,MAAM,EAAGJ,EAAI,GAAKF,GAAO,MAAMM,MAAMJ,GAAK,IAKlE,SAAWK,QAAS,YAAa,CAC7BtB,OAA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